package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;


@TableName("user")//当实体类和表名不一致的时候，用@tablename来指定表名
public class User {
	@TableId(type = IdType.AUTO)
	private Long id;
	private String userName;
	private String realName;
	private String phone;
	private String email;
	private String password;

	private Integer roleId;

	@TableField(exist = false)
	private String confirmPassword;
	@TableField(exist = false)
	private Carrier carrier;

	@TableField(exist = false)
	private String token;

	@TableField(exist = false)
	private Role role;

	public User(){
	}

	public User(String username, String realName, String password, String phone, String email, Integer roleId) {
		this.userName = username;
		this.realName = realName;
		this.email = email;
		this.phone = phone;
		this.password = password;
		this.roleId = roleId;
	}
	public User(Long id, String username, String realName, String password, String phone, String email, Integer roleId) {
	this.id = id;
	this.userName = username;
	this.realName = realName;
	this.email = email;
	this.phone = phone;
	this.password = password;
	this.roleId = roleId;
	}


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}




	public Carrier getCarrier() {
		return carrier;
	}

	public void setCarrier(Carrier carrier) {
		this.carrier = carrier;
	}

	public String getConfirmPassword() {
		return confirmPassword;
	}

	public void setConfirmPassword(String confirmPassword) {
		this.confirmPassword = confirmPassword;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

}
